<template>
  <div id="userList">
    <div class="box_top">
      <div class="slash_title">提示</div>
    </div>
      <el-input  type="text" v-model="input" clearable> </el-input>
      <el-button @click="submitFun" style="margin-left:40px" type="primary">保存</el-button>
  </div>
</template>

<script>
import EditorBar from "../../components/wangEditor.vue";
export default {
  components: { EditorBar },
  data() {
    return {
      input:''
    };
  },
  mounted() {
    this.searchFun()
  },
  methods: {
    //查询
    searchFun(){
      this.$https(this.$api.api.ts_show,{},"GET").then(res=>{
        console.log("提示展示",res);
        if(res.data.code == 1) {
          this.input = res.data.data.ts
        } 
      })
    },
    submitFun(){
      this.$https(this.$api.api.ts_edit,{ts:this.input},"GET").then(res=>{
        console.log("提示提交",res);
        if(res.data.code = 1) {
           this.$message.success("保存成功！")
           this.searchFun()
        } 
      })
    },
  },
};
</script>

<style scoped lang="less">
.lastrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.box_top {
  margin-bottom: 20px;
  .slash_title {
    border-left: 3px solid #000;
    padding-left: 10px;
  }
}
#userList {
  width: 85vw;
  height: 94vh;
  .el-input {
    width: 430px;
  }
  .userList_top {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
  }
  .userList_centent {
    margin-top: 10px;
  }
}

.box_top {
  .slash_title {
    border-left: 3px solid #000;
    margin-bottom: 20px;
    padding-left: 10px;
  }
}
</style>